package demo;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


/*
 * 

CREATE USER 'abc'@'localhost' IDENTIFIED BY '123456';

GRANT GRANT OPTION ON *.* TO 'abc'@'localhost';

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'abc'@'localhost';

GRANT SELECT, INSERT, UPDATE, REFERENCES, DELETE, CREATE, DROP, ALTER, INDEX, TRIGGER, CREATE VIEW, SHOW VIEW, EXECUTE, ALTER ROUTINE, CREATE ROUTINE, CREATE TEMPORARY TABLES, LOCK TABLES, EVENT ON `test`.* TO 'abc'@'localhost';

GRANT GRANT OPTION ON `test`.* TO 'abc'@'localhost';

 DROP TABLE IF EXISTS `news_info`;
 CREATE TABLE `news_info` (
  `id` int(11) NOT NULL DEFAULT '0',
  `title` text,
  `content` text CHARACTER SET utf8,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 *
 */
 
public class TestMain {

    public static void  test1()
    {
        ApplicationContext ctx=new ClassPathXmlApplicationContext("bean_lec07.xml");
        NewsDao hello = ctx.getBean("newsDao", NewsDao.class);
        hello.insert("aabb", "Boot");
       
    }

    public static void main(String[] args)
    {
        test1();
    }
    
}
